import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { SysDepartPermissionService } from './sys_depart_permission.service';
import { CreateSysDepartPermissionDto } from './dto/create-sys_depart_permission.dto';
import { UpdateSysDepartPermissionDto } from './dto/update-sys_depart_permission.dto';

@Controller('sys-depart-permission')
export class SysDepartPermissionController {
  constructor(private readonly sysDepartPermissionService: SysDepartPermissionService) {}

  @Post()
  create(@Body() createSysDepartPermissionDto: CreateSysDepartPermissionDto) {
    return this.sysDepartPermissionService.create(createSysDepartPermissionDto);
  }

  @Get()
  findAll() {
    return this.sysDepartPermissionService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.sysDepartPermissionService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateSysDepartPermissionDto: UpdateSysDepartPermissionDto) {
    return this.sysDepartPermissionService.update(id, updateSysDepartPermissionDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.sysDepartPermissionService.remove(id);
  }
}
